package com.chinasoft.mapper;

import com.chinasoft.bean.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentMapper {

    @Select("select * from student")
    public List<Student> selectAll();

    @Insert("insert into student values (#{id},#{name},#{age})")

    public Integer insert (Student stu);

    @Update("update student set name=#{name},age=#{age} where id=#{id}")

    public Integer update(Student stu);
    @Delete("delete from student where id=#{id}")
    public Integer delete(Integer id);}
